package comxin.date;

import org.junit.Test;

import java.util.Calendar;

public class Calendardemo1 {
    @Test
    public void method1(){
        Calendar calendar = Calendar.getInstance();
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH) + 1;
        int date = calendar.get(Calendar.DATE);
        System.out.println(year+"--"+month+"--"+date);
    }
}
